<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        let a = 'name'
        let obj = {}//{name : 'tom''}
        obj[a] = 'tom'
        console.log(obj)
    </script>
</body>
</html>